import { NgModule } from '@angular/core'

import { SharedModule } from '@shared'
import { DashboardRoutingModule } from './dashboard-routing.module'
import { DashboardService } from './dashboard.abstract.service'
import { DashboardAlinterService } from './dashboard-alinter.service'
import { DashboardTasksComponent } from './tasks/tasks.component'
import { DashboardTaskDetailComponent } from './tasks/detail/detail.component'
import { RefundTaskDetailComponent } from './tasks/detail/refund/refund-task-detail.component'
import { TaskBaseInfoComponent } from './tasks/detail/common/task-base-info/task-base-info.component'
import { TaskHistoryListComponent } from './tasks/detail/common/history-list/history-list.component'
import { OriginTradeInfoComponent } from './tasks/detail/refund/components/origin-trade-info/origin-trade-info.component'
import { TaskRefundInfoComponent } from './tasks/detail/refund/components/refund-info/refund-info.component'
import { RiskTaskDetailComponent } from './tasks/detail/risk/risk.component'
import { TaskRiskInfoComponent } from './tasks/detail/risk/components/risk-info/risk-info.component'
import { StoreTaskDetailComponent } from './tasks/detail/store/store.component'
import { AuditOperateComponent } from './tasks/detail/common/audit-operate/audit-operate.component'
import { ChargeBackTaskDetailComponent } from './tasks/detail/charge-back/charge-back.component'
import { ChargeBackTradeDetailComponent } from './tasks/detail/charge-back/components/charge-trade-detail.component'
import { PostRiskComponent } from './tasks/detail/post-risk/post-risk.component'
import { ReleaseTaskDetailComponent } from './tasks/detail/release/release.component'
import { DepositTaskComponent } from './tasks/detail/deposit/deposit.component'
import { DepositTaskRestitutionDetailComponent } from './tasks/detail/deposit/components/restitution.component'
import { PostRiskStoreService } from '../post-risk/new/post-risk-store.service'
import { PostRiskService } from '../post-risk/post-risk.service'
import { RiskAlinterService } from '../post-risk/post-risk-alinter.service'
import { StoreDataService } from '../store/store-data.service'
import { ChannelFormService } from '../store/components/channel-form/channel-form.service'
import { ChannelFormCardService } from '../store/components/channel-form/channel-form-card.service'
import { ChannelFormQRService } from '../store/components/channel-form/channel-form-qr.service'
import { ChannelFormECService } from '../store/components/channel-form/channel-form-ec.service'
import { FieldControlService } from '../store/components/channel-form/field-control.service'
import { TabQRChannelsService } from '../store/detail/tab-qr-channels/tab-qr-channels.service'
import { StoreDetailRouterGuardClass } from '@shared/classes/StoreDetailRouterGuardClass'
import { TabCardChannelsService } from '../store/detail/tab-card-channels/tab-card-channels.service'

const COMPONENTS = [
  DashboardTasksComponent,
  DashboardTaskDetailComponent,
]
const COMPONENTS_NOROUNT = [
  RefundTaskDetailComponent,
  RiskTaskDetailComponent,
  StoreTaskDetailComponent,
  ChargeBackTaskDetailComponent,
  TaskRiskInfoComponent,
  TaskBaseInfoComponent,
  TaskHistoryListComponent,
  OriginTradeInfoComponent,
  TaskRefundInfoComponent,
  AuditOperateComponent,
  ChargeBackTradeDetailComponent,
  ReleaseTaskDetailComponent,
  DepositTaskComponent,
  DepositTaskRestitutionDetailComponent,
  PostRiskComponent,
]

@NgModule({
  imports: [
    SharedModule,
    DashboardRoutingModule,
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT,
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    PostRiskStoreService,
    { provide: DashboardService, useClass: DashboardAlinterService },
    { provide: PostRiskService, useClass: RiskAlinterService },
    ChannelFormService,
    ChannelFormCardService,
    ChannelFormQRService,
    ChannelFormECService,
    FieldControlService,
    StoreDataService,
    TabQRChannelsService,
    StoreDetailRouterGuardClass,
    TabCardChannelsService,
  ],
})
export class DashboardModule { }
